import request from "@/utils/request";

export function getSupplyDetail(id) {
  return request({
    url: `/supply/${id}`,
    method: "get",
  });
}

export async function getResourceDetail(id) {
  const { code, data, msg } = await request({
    url: `/resource/order/${id}`,
    method: "get",
  });
  return {
    code,
    msg,
    data: {
      ...data.resourceSupply,
      id: data.id,
      applyDesc: data.supplyDesc,
      orderLastTime: data.orderLastTime,
      supplyTime: data.supplyTime,
    },
  };
}
